﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using SilenthinkContract.Domain;

namespace SilenthinkContract
{
    [ServiceContract(Namespace = ServiceContract.Namespace)]
    public interface IOrderService : IService
    {
        #region Order
        [OperationContract]
        bool CreateOrder(Order o);
        [OperationContract]
        bool UpdateOrder(Order o);
        [OperationContract]
        bool DeleteOrder(string id);
        [OperationContract]
        string GetAuctionOrderId(long userId, long auctionId);
        [OperationContract]
        Order GetOrder(string id);
        [OperationContract(Name = "GetOrderWithDetails")]
        Order GetOrder(string id, long? userId = null, bool inclExtra = false, bool inclItem = false,bool inclNote = false);
        [OperationContract]
        PageList<Order> GetPagedOrder(int index = 1, int size = 20,string username = null, long? userId = null, OrderStatus? orderStatus = null, PaymentStatus? paymentStatus = null, ShippingStatus? shippingStatus = null, DateTime? beginDate = null, DateTime? endDate = null);

        [OperationContract]
        IList<OrderItem> GetOrderItems(string[] orderIds);

        #endregion
    }
}